package com.example.demo.entity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author liye
 * @date 2025/10/10 8:40
 * @description:
 */
public class HospitalAreaAddDto {

    /**
     * 院区名称
     */
    //@NotNull  //"         " true   实际也是空
    @NotBlank  //字符串去掉首位空格length>0 为true
    @Length(min = 2,max = 10,message = "医院的名字长度在2-10之间")
    private String areaName;
    /**
     * 院区备注
     */
    @Length(min = 2,max = 2000,message = "医院备注的长度在2-2000之间")
    private String areaRemark;
    /**
     * 院区地址
     */
    @NotBlank
    private String areaAddress;

    /**
     * 院区电话
     */
    @NotBlank
    @Length(min = 11,max = 11,message = "电话长度为11位:示例(座机号：028-1234567)")
    private String areaPhone;


    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date areaStartTime;

    public Date getAreaStartTime() {
        return areaStartTime;
    }

    public void setAreaStartTime(Date areaStartTime) {
        this.areaStartTime = areaStartTime;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getAreaAddress() {
        return areaAddress;
    }

    public void setAreaAddress(String areaAddress) {
        this.areaAddress = areaAddress;
    }

    public String getAreaPhone() {
        return areaPhone;
    }

    public void setAreaPhone(String areaPhone) {
        this.areaPhone = areaPhone;
    }

    public String getAreaRemark() {
        return areaRemark;
    }

    public void setAreaRemark(String areaRemark) {
        this.areaRemark = areaRemark;
    }
}
